{yun:}include file="$wapstyle/member/lheader.htm"{/yun}
<link rel="stylesheet" href="{yun:}$wap_style{/yun}/js/mui/css/mui.picker.min.css?v={yun:}$config.cachecode{/yun}" type="text/css" />
<link rel="stylesheet" href="{yun:}$config.sy_weburl{/yun}/app/template/wap/css/style.css?v={yun:}$config.cachecode{/yun}" type="text/css" />
<script src="{yun:}$wap_style{/yun}/js/compress.js?v={yun:}$config.cachecode{/yun}" language="javascript"></script>

<script>
    var integral = '{yun:}$statis.integral{/yun}';
    var pro = '{yun:}$config.integral_proportion{/yun}';
</script>

<div id="app" class="mui-views">
    <div class="mui-view">
        <div class="mui-pages"></div>
    </div>
</div>

<!--页面主结构结束-->
<!--单页面开始-->
<div id="main" class="mui-page">
    <!--页面主内容区开始-->
    <div class="mui-page-content">
        <div class="mui-scroll-wrapper">
            <div class="mui-scroll">

                <section class="wap_member">

                    <div class="clear"></div>

                    <ul class="member_ms">
                        <li>
                            <a href="index.php?c=rating">套餐模式</a>
                        </li>
                        <li class="member_ms_cur">
                            <a href="index.php?c=time">时间模式</a>
                        </li>
                    </ul>

                    <div class="member_tc_list">
                        <ul id="level_rating">
                            {yun:}foreach from=$rows item=v key=key{/yun} {yun:}if $v.service_time>0{/yun}

                            <li {yun:}if $key=='0' {/yun}class="member_set_meal_cur" {yun:}/if{/yun}>

                                <div class="member_set_meal_name">
                                    <i class="member_set_meal_name_q"></i>
                                    <span class="member_set_meal_name_s">{yun:}$v.name{/yun}</span> {yun:}if $config.com_integral_online==3 && $config.member_meal!=1{/yun}
                                    <span class="member_set_meal_jg">
					 			   			<span>
						 			   			{yun:}if $v.time_start < time()&& $v.time_end > time(){/yun}
													{yun:}$v.yh_price*$config.integral_proportion{/yun}
												{yun:}else{/yun}
													{yun:}$v.service_price*$config.integral_proportion{/yun}
												{yun:}/if{/yun} 
											</span>

                                    <em class="member_set_meal_time">
					 			   				{yun:}if $v.time_start < time()&& $v.time_end > time(){/yun} 
					 			   					<i class="member_set_meal_yj">{yun:}$v.service_price*$config.integral_proportion{/yun}</i> 
					 			   				{yun:}/if{/yun} 	
					 			   				{yun:}$config.integral_pricename{/yun}/ {yun:}if $v.service_time>0{/yun}{yun:}$v.service_time{/yun}天{yun:}else{/yun}永久{yun:}/if{/yun}
					 			   			</em>
                                    </span>
                                    {yun:}else{/yun}
                                    <span class="member_set_meal_jg">
					  						<span>
					  							{yun:}if $v.time_start < time()&& $v.time_end > time(){/yun}
													￥{yun:}$v.yh_price{/yun}
												{yun:}else{/yun}
													￥{yun:}$v.service_price{/yun}
												{yun:}/if{/yun}
											</span>
                                    <em class="member_set_meal_time">
												{yun:}if $v.time_start < time()&& $v.time_end > time(){/yun}
													<i class="member_set_meal_yj">￥{yun:}$v.service_price{/yun}</i>
												{yun:}/if{/yun}
												/ {yun:}if $v.service_time>0{/yun}{yun:}$v.service_time{/yun}天{yun:}else{/yun}永久{yun:}/if{/yun}
											</em>
                                    </span>
                                    {yun:}/if{/yun}
                                </div>

                                <div class="member_set_meal_cont">
                                    <div class="member_set_meal_cont_box">
                                        <div class="member_set_meal_showboxtime">套餐内容：时间模式会员，有效时间内，发布职位、下载简历等操作不受限制！</div>
                                    </div>
                                </div>

                                <span id="ratingid" style="display: none;">{yun:}$v.id{/yun}</span>
                                <input type="hidden" id="server_price" value="{yun:}if $v.time_start<time()&& $v.time_end>time(){/yun}{yun:}$v.yh_price{/yun}{yun:}else{/yun}{yun:}$v.service_price{/yun}{yun:}/if{/yun} ">

                            </li>
                            {yun:}/if{/yun} {yun:}foreachelse{/yun}

                            <div class="wap_member_no">暂无时间会员服务</div>

                            {yun:}/foreach{/yun}

                            <input type="hidden" value="{yun:}$row.id{/yun}" id="rating_id" />
                            <input type="hidden" id="r_price" value="{yun:}if $row.time_start<time()&& $row.time_end>time(){/yun}{yun:}$row.yh_price{/yun}{yun:}else{/yun}{yun:}$row.service_price{/yun}{yun:}/if{/yun}">

                        </ul>

                        {yun:}if $config.com_integral_online==3 && $config.member_meal!=1{/yun}

                        <div class="member_set_meal_fk_zf">
                            <input type="button" class="member_set_meal_fk_zf_bth" value="确认支付" onclick="integral_rating_buy();">
                        </div>

                        {yun:}else{/yun}

                        <div class="member_set_meal_fk_fbox mt15">
                            <div class="member_set_meal_fk">
                                订单金额
                                <span class="member_set_meal_fk_jg">￥
						 			<span id="price">
						 				{yun:}if $row.time_start < time()&& $row.time_end > time(){/yun}
												{yun:}$row.yh_price{/yun}
											{yun:}else{/yun}
												{yun:}$row.service_price{/yun}
											{yun:}/if{/yun}
						 			</span>
                                </span>
                            </div>
							{yun:}if $config.com_integral_online==1 && $config.member_meal!=1{/yun}
                            <div class="spread_box" style="border-bottom:1px solid #eee">
                                {yun:}$config.integral_pricename{/yun}抵扣
                                <div class="spread_box_hs">
                                    当前共有
                                    <font color="#3399FF"> {yun:}$statis.integral{/yun} </font>{yun:}$config.integral_pricename{/yun} (1元={yun:}$config.integral_proportion{/yun}{yun:}$config.integral_pricename{/yun})
                                </div>
                                <!--<i class="spread_choice"></i>-->
                                <div class="mui-switch mui-switch-mini" id="integral_switch_rating" style="position: absolute;right: 10px;top: 15px;">
                                    <div class="mui-switch-handle"></div>
                                </div>

                                <div class="spread_box_hs_sl" id="spread_integral_box" style="display:none;">
                                    {yun:}$config.integral_pricename{/yun}抵扣数量：
                                    <input type="text" onkeyup="checkNum('{yun:}$statis.integral{/yun}','{yun:}$config.integral_proportion{/yun}');" oninput="myFunction(this)" value="" class="member_set_meal_dk" placeholder="" id="integral_pay" name="integral_pay">
                                </div>
                            </div>

                            <div class="spread_box_yfmoney">
                                应付金额：
                                <span class="spread_box_yfmoney_n">￥ 	
					        		<span id="order_price">
					        			{yun:}if $row.time_start < time()&& $row.time_end > time(){/yun}
												{yun:}$row.yh_price{/yun}
											{yun:}else{/yun}
												{yun:}$row.service_price{/yun}
											{yun:}/if{/yun}
					        		</span>
                                </span>
                            </div>
                            {yun:}/if{/yun}
                        </div>

                        <form action="index.php?c=dingdan" method="post" onsubmit="return pay_form();" id="paymentform">

                            {yun:}if $coupons{/yun}
                            <div class="pay_xymoney" id="div_coupon">
                                <span class="pay_xymoney_name">优惠券</span>
                                <a href="#couponhtml">
                                    <div class="pay_xymoney_t" id="couponshow">请选择</div>
                                </a>
                                <input type="hidden" id="coupon" name="coupon" value="">
                            </div>
                            {yun:}/if{/yun}

                            <div class="member_set_meal_fk_fbox">

                                {yun:}if $config.wxpay==1{/yun}
                                <div class="member_set_meal_fk_fs member_set_meal_fk_fs_wx" onclick="paycheck('wxpay');">
                                    <i class="wxpay member_set_meal_fk_xz"></i>微信支付
                                </div>
                                {yun:}/if{/yun} {yun:}if $config.alipay==1{/yun}
                                <div class="member_set_meal_fk_fs member_set_meal_fk_fs_zfb" onclick="paycheck('alipay');">
                                    <i class="alipay member_set_meal_fk_xz"></i>支付宝
                                </div>
                                {yun:}/if{/yun} {yun:}if $config.bank==1 && $banks{/yun}

                                <div class="spread_box_more" id="spreadpaymore">其他支付方式</div>

                                <div class="member_set_meal_fk_fs member_set_meal_fk_fs_yl" id="spreadotherpay" onclick="paycheck('bank');" style="display:none">
                                    <i class="bank member_set_meal_fk_xz" id="switchbank"></i>银行汇款
                                </div>

                                <div class="paybank item" id="spreadpaybank" style="display: none;">
                                    <div class="paybank_tip"><span class="com_remind">汇款前请仔细核对银行帐号</span></div>

                                    <div class="admin_note2">
                                        <div class="my_table_msg">
                                            {yun:}if is_array($banks){/yun} {yun:}foreach item=blist from=$banks{/yun}
                                            <div class="pay_bank_list">
                                                <div class="">{yun:}$blist.bank_name{/yun}</div>
                                                <div class="">{yun:}$blist.name{/yun}</div>
                                                <div class="">{yun:}$blist.bank_number{/yun}</div>
                                                <div class="">{yun:}$blist.bank_address{/yun}</div>
                                            </div>
                                            {yun:}/foreach{/yun} {yun:}else{/yun}
                                            <div class="wap_member_no">暂未添加银行</div>
                                            {yun:}/if{/yun}
                                        </div>

                                        <div class="paybank_tip">填写汇款凭证：</div>
                                        <div class="my_table_msg">
                                            <div class="paybank_hk_list">
                                                <div class="paybank_name">汇款银行</div>
                                                <div class="">
                                                    <input type="text" id="bank_name" name="bank_name" class="paybank_hk_text" value="" placeholder="如：中国银行+沭阳开发区支行">
                                                </div>
                                            </div>

                                            <div class="paybank_hk_list">
                                                <div class="paybank_name">汇入账号</div>
                                                <div class=""><input type="text" id="bank_number" name="bank_number" class="paybank_hk_text" onkeyup="this.value=this.value.replace(/[^0-9.]/g,'')" value="" placeholder="请填写汇入账号"></div>
                                            </div>

                                            <div class="paybank_hk_list">
                                                <div class="paybank_name">汇款金额</div>
                                                <div class=""><input type="text" id="bank_price" name="bank_price" class="paybank_hk_text" value="10" placeholder="请填写汇款金额"></div>
                                            </div>

                                            <div class="paybank_hk_list">
                                                <div class="paybank_name">汇款时间</div>
                                                <div class="" style="text-align:right"><button id='banktimePicker' data-options='{"type":"date"}' style="border:none;">请选择汇款时间</button>
                                                    <input type="hidden" id="bank_time" name="bank_time" /></div>
                                            </div>

                                            <div class="paybank_hk_list">
                                                <div class="paybank_name">汇款单</div>
                                                <div class="" style="text-align:right">
                                                	
                                                	<span class="once_cont_wate_list_photo_pic" id="previewshow" style="display: none;"> <img id="previewimg" width="35" height="35"></span>
                                                	<div class="paybank_hk_file_box">
					                                    <i class="paybank_hk_file_icon"></i> 上传汇款单
					                                	<input type="file" name="pic" id="pic" onchange="previewImage(this,'preview')" class="paybank_hk_file" />
					                                	<input type='hidden' name='preview' value='' id='preview'>
					                                </div>
                                                     
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                {yun:}/if{/yun}
                            </div>

                            <input type="hidden" value="{yun:}$row.id{/yun}" id="id" name="comvip">
                            <input type="hidden" value="" id="paytype" name="paytype">
                            <input type="hidden" value="" id="dkjf" name="dkjf">
                            <input type="hidden" value="{yun:}if $row.time_start<time()&& $row.time_end>time(){/yun}{yun:}$row.yh_price{/yun}{yun:}else{/yun}{yun:}$row.service_price{/yun}{yun:}/if{/yun}" id="vip_price" name="price"> {yun:}if $config.wxpay==1 || $config.alipay==1 || ($config.bank==1 && $banks){/yun}
                            <div class="member_set_meal_fk_zf">
                                <input type="submit" class="member_set_meal_fk_zf_bth" style="border:none" value="确认支付">
                            </div>
                            {yun:}else{/yun}
                          <div class="pay_zfgb_tip">
                                <span>网站已关闭支付功能，请联系管理员！</span>
                            </div>
                            {yun:}/if{/yun}
                        </form>

                        <div class="member_set_meal_fk_zf" style="display: none;" id="integral_buy">
                            <input type="button" class="member_set_meal_fk_zf_bth" style="border:none;color:white" value="确认支付" onclick="integral_rating_buy();">
                        </div>

                        {yun:}/if{/yun}
                    </div>

                    <div class="clear"></div>

                </section>
            </div>
        </div>
    </div>
    <!--页面主内容区结束-->
</div>

<!--单页面结束-->
<div id="couponhtml" class="mui-page">
    <div class="mui-page-content">
        <div class="mui-scroll-wrapper">
            <div class="mui-scroll">
                <div class="mui-card">
                    <div class="mui-input-row mui-radio mui-left">
                        <label>暂不使用</label>
                        <input name="coupons" type="radio" id="coupon0" value="0">
                        <input type="hidden" id="0" value="0">
                    </div>
                    {yun:}foreach from=$coupons item=clist{/yun}
                    <div class="mui-input-row mui-radio mui-left">
                        <label>{yun:}$clist.coupon_name{/yun}{yun:}if $clist.coupon_scope{/yun}(满{yun:}$clist.coupon_scope{/yun}元可使用) {yun:}/if{/yun}</label>
                        <input name="coupons" type="radio" id="coupon{yun:}$clist.id{/yun}" value="{yun:}$clist.id{/yun}" class="coupon" data-name="{yun:}$clist.coupon_name{/yun}">
                        <input type="hidden" id="{yun:}$clist.id{/yun}" value="{yun:}$clist.coupon_scope{/yun}">
                    </div>
                    {yun:}/foreach{/yun}
                </div>
            </div>
        </div>
    </div>
</div>


<script src="{yun:}$wap_style{/yun}/js/mui/mui.picker.min.js?v={yun:}$config.cachecode{/yun}" language="javascript"></script>
<script src="{yun:}$wap_style{/yun}/js/mui/mui.view.js?v={yun:}$config.cachecode{/yun}" language="javascript"></script>

<script language="javascript">
    mui.init();
    var viewApi = mui('#app').view({
        defaultPage: '#main'
    });

    //初始化单页的区域滚动
    mui('.mui-scroll-wrapper').scroll();
    var view = viewApi.view;

    (function($) {
        //处理view的后退与webview后退
        var oldBack = $.back;
        $.back = function() {
            if(viewApi.canBack()) { //如果view可以后退，则执行view的后退
                viewApi.back();
            } else { //执行webview后退
                oldBack();
            }
        };
        view.addEventListener('pageBeforeBack', function(e) {
            var coupon = '',
                couponid = '';
            $('.coupon').each(function(i, arr) {
                if(arr.checked == true) {
                    coupon = arr.dataset.name;
                    couponid = arr.value;
                }
            });
            if(coupon) {
                document.getElementById('couponshow').innerText = coupon;
                document.getElementById('coupon').value = couponid;
            } else {
                document.getElementById('couponshow').innerText = '暂不使用';
                document.getElementById('coupon').value = '';
            }
        });
    })(mui);
    $(document).ready(function() {
		if(document.getElementById('main')){
			document.getElementById('main').addEventListener('touchmove', function (e) { e.preventDefault();}, {passive: false});
		}
	})
</script>
<script src="{yun:}$wap_style{/yun}/js/pay.js?v={yun:}$config.cachecode{/yun}" language="javascript"></script>
{yun:}include file="$wapstyle/footer.htm"{/yun}